home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-12 | 1.2 KB | 43 lines | [TEXT/PJMM] |
- unit ReSize;
-
- interface
-
- uses
- Globals;
-
- procedure ReSize (a_window: WindowPtr; downpt: Point);
-
- implementation
-
- {Change the size of the given window}
- {############################ ReSize ###############################}
-
- { Called on a mouse-down in the grow box, this allows the user to change}
- { the size of the window. We change the size, then}
- { claim that the whole of the window contents is no longer validly drawn,}
- { because we're too lazy to do so for just the scroll bar regions}
- { that are actually subject to change. See the Window Manager.}
-
- procedure ReSize (a_window: WindowPtr; downpt: Point);
- var
- w, h: Integer; (* new width and height of the sized window *)
- newsize: LongInt; (* the new size *)
- begin
-
- newsize := GrowWindow(a_window, downpt, growrect);
- (* find new size *)
- w := LoWord(newsize); (* find the width *)
- h := HiWord(newsize); (* find the height *)
-
- SizeWindow(a_window, w, h, true);(* change to the new window size *)
-
- { place whole window into update Region to be sure it all gets}
- { updated. This is more than is strictly necessary, but a lot}
- { easier than just invalidating the regions that actually may have}
- { changed.}
-
- InvalRect(a_window^.portRect);
-
- end; (* ReSize *)
-
- end.